//
//  UIColor+YJExtension.h
//  YJBaseProject
//
//  Created by 冯垚杰 on 2017/8/17.
//  Copyright © 2017年 冯垚杰. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM (NSUInteger, YJGradientStyle) {
    /**
     *  Returns a gradual blend between colors originating at the leftmost point of an object's frame,
     *  and ending at the rightmost point of the object's frame.
     */
    YJGradientStyleLeftToRight,
    /**
     *  Returns a gradual blend between colors originating at the center of an object's frame,
     *  and ending at all edges of the object's frame. NOTE: Supports a Maximum of 2 Colors.
     */
    YJGradientStyleRadial,
    /**
     *  Returns a gradual blend between colors originating at the topmost point of an object's frame,
     *  and ending at the bottommost point of the object's frame.
     */
    YJGradientStyleTopToBottom
};


@interface UIColor (YJExtension)

/**
 随机颜色
 */
+ (instancetype)yj_random;

+ (UIColor *)yj_colorWithHex:(NSString *)hex alpha:(CGFloat)alpha;

+ (UIColor *)yj_colorWithGradientStyle:(YJGradientStyle)gradientStyle
                              withFrame:(CGRect)frame
                              andColors:(NSArray *)colors;

@end
